Skip to content

fix(Android): icons are not showing on older Android versions#6998

Open
Rohit3523 wants to merge 9 commits intodevelopfrom
load-custom-font
Open

fix(Android): icons are not showing on older Android versions#6998
Rohit3523 wants to merge 9 commits intodevelopfrom
load-custom-font

Conversation

@Rohit3523
Copy link
Contributor

@Rohit3523 Rohit3523 commented Feb 20, 2026

Proposed changes

On older Android devices, vector icons are not displayed because Expo fails to load the font.

Issue(s)

https://rocketchat.atlassian.net/browse/SUP-977

How to test or reproduce

Screenshots

Before After
Screenshot 2026-02-20 at 8 26 43 PM Screenshot 2026-02-20 at 8 31 02 PM
Screenshot 2026-02-20 at 8 27 57 PM Screenshot 2026-02-20 at 8 31 54 PM
Screenshot 2026-02-20 at 8 28 33 PM Screenshot 2026-02-20 at 8 32 34 PM
Screenshot 2026-02-20 at 8 29 05 PM Screenshot 2026-02-20 at 8 33 10 PM
Screenshot 2026-02-20 at 8 29 29 PM Screenshot 2026-02-20 at 8 30 02 PM

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • New Features

    • Adds runtime font loading so a custom font is used by the app.
  • Bug Fixes

    • Waits for fonts (or font errors) before initial render to prevent startup visual glitches and reduce flicker.
    • Improves handling of font load failures so the app remains stable if a font fails to load.
  • Chores

    • Adds font plugin configuration and a runtime dependency for font support.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

AppContainer now loads a custom font via expo-font's useFonts, tracks font load success/error, and only renders once both root and (fonts loaded or font error) are available. app.json and package.json were updated to include the expo-font plugin and dependency.

Changes

Cohort / File(s) Summary
App container
app/AppContainer.tsx
Integrated useFonts from expo-font; added fontsLoaded/fontError handling; updated render guard to wait for root and font load/error; adjusted logging usage.
App config
app.json
Added top-level plugins entry including "expo-font".
Dependencies
package.json
Added runtime dependency expo-font (~13.3.2).
Type config
tsconfig.json
Minor formatting/comment changes only (no semantic changes).

Sequence Diagram(s)

sequenceDiagram
  participant App as AppContainer
  participant Root as RootState
  participant Font as ExpoFontLoader
  participant Log as Logger

  App->>Root: read `root` readiness
  App->>Font: call useFonts(load custom font)
  Font-->>App: fontsLoaded OR fontError
  alt fontError
    App->>Log: log font error
  end
  App->>App: render only if (root && (fontsLoaded || fontError))
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title claims to fix icons not showing on older Android versions, but the code changes only add expo-font loading without addressing version-specific Android issues. Update the title to accurately reflect that the PR adds custom font loading via expo-font, or clarify how this specifically addresses older Android versions.
Out of Scope Changes check ⚠️ Warning The PR includes tsconfig.json formatting changes (removed trailing commas and converted to inline comments) that are unrelated to the font loading objective. Remove the tsconfig.json formatting changes or justify their necessity; keep the PR focused on the expo-font integration for icon display.
Linked Issues check ❓ Inconclusive The linked issue SUP-977 mentions a hidden 'Send' button on Android tablets, but the PR changes only add expo-font dependency for custom font loading without directly addressing UI element visibility. Clarify the connection between the font loading changes and the hidden Send button issue, or provide additional context on how expo-font resolves the SUP-977 issue.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build February 20, 2026 14:47 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build February 20, 2026 14:47 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build February 20, 2026 14:47 — with GitHub Actions Error
@Rohit3523 Rohit3523 changed the title fix(Android): emojis are not showing on older Android versions fix(Android): icons are not showing on older Android versions Feb 20, 2026
@Rohit3523 Rohit3523 marked this pull request as ready for review February 20, 2026 15:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
app/AppContainer.tsx (2)

51-53: Consider handling the font-loading wait with SplashScreen to prevent a blank-screen flash.

With the corrected guard (|| !root), the component returns null during both font loading and root initialization. This can produce a visible blank screen. The expo-splash-screen library provides a SplashScreen component that you can use to prevent rendering the app until the font is loaded and ready. Pairing SplashScreen.preventAutoHideAsync() at the module level and SplashScreen.hideAsync() once loaded || fontError would give a smoother experience on slow devices where this font load is most likely to be perceptible.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/AppContainer.tsx` around lines 51 - 53, Change the current guard that
returns null during font/root init to use the Expo SplashScreen flow: call
SplashScreen.preventAutoHideAsync() at module load, keep rendering until the app
is ready, and when either loaded || fontError || root is truthy call
SplashScreen.hideAsync() before returning the app UI; update references in
AppContainer.tsx around the loaded, fontError and root checks to stop returning
null directly and instead hide the splash once ready. Ensure you import
expo-splash-screen and only call hideAsync once (and handle errors) so the
splash prevents the blank-screen flash during font loading.

47-49: Font loading should be hoisted to the app entry point, not placed inside the navigation container component.

Expo recommends mapping font files using the useFonts hook in a top-level component such as the root layout file. Placing it here means font loading won't begin until this connected component mounts (after Redux store setup and initial render), adding unnecessary latency. A font loading failure or slow load will block the entire navigation stack.

For Android/iOS specifically, there are two ways to add fonts: using the expo-font config plugin (recommended for Android and iOS) or loading them at runtime. On Android and iOS, the plugin allows you to embed font files at build time, which is more efficient than useFonts or loadAsync. Since the issue is specifically about older Android, the config plugin would be the more robust long-term fix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/AppContainer.tsx` around lines 47 - 49, The useFonts call inside
AppContainer should be removed and font loading hoisted to the app entry point
(e.g., App.tsx / root layout) so fonts load before the navigation stack mounts;
locate and delete the useFonts invocation in AppContainer and instead load the
same './static/fonts/custom.ttf' at app startup (using useFonts in the root
component or, for Android/iOS, configure the expo-font config plugin to embed
the font at build time), and update AppContainer to assume fonts are already
available.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae5e663 and 7861642.

⛔ Files ignored due to path filters (1)
  • app/static/fonts/custom.ttf is excluded by !**/*.ttf
📒 Files selected for processing (1)
  • app/AppContainer.tsx
🔇 Additional comments (1)
app/AppContainer.tsx (1)

47-49: No action needed. The font key 'custom' in useFonts correctly matches the fontFamily name used by createIconSetFromIcoMoon in the CustomIcon component. Line 10 of app/containers/CustomIcon/index.tsx explicitly creates the icon set with createIconSetFromIcoMoon(icoMoonConfig, 'custom', 'custom.ttf'), where the second parameter specifies the fontFamily as 'custom'. This matches the key in AppContainer.tsx, so icons will render correctly.

Likely an incorrect or invalid review comment.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/AppContainer.tsx`:
- Around line 47-53: The early-return guard in AppContainer is wrong: capture
the second return value from useFonts (error) instead of discarding it, and
change the condition so the component returns null when fonts aren't ready or
root is falsy. Concretely, update the useFonts call to const [loaded, error] =
useFonts(...) and replace the if check with the idiomatic Expo pattern combined
with the root invariant (i.e., return null when fonts are still loading without
an error OR when root is falsy) so that the component only renders when fonts
are loaded (or errored) and root is truthy; reference useFonts, loaded, error,
and root to find the relevant lines.

---

Nitpick comments:
In `@app/AppContainer.tsx`:
- Around line 51-53: Change the current guard that returns null during font/root
init to use the Expo SplashScreen flow: call SplashScreen.preventAutoHideAsync()
at module load, keep rendering until the app is ready, and when either loaded ||
fontError || root is truthy call SplashScreen.hideAsync() before returning the
app UI; update references in AppContainer.tsx around the loaded, fontError and
root checks to stop returning null directly and instead hide the splash once
ready. Ensure you import expo-splash-screen and only call hideAsync once (and
handle errors) so the splash prevents the blank-screen flash during font
loading.
- Around line 47-49: The useFonts call inside AppContainer should be removed and
font loading hoisted to the app entry point (e.g., App.tsx / root layout) so
fonts load before the navigation stack mounts; locate and delete the useFonts
invocation in AppContainer and instead load the same './static/fonts/custom.ttf'
at app startup (using useFonts in the root component or, for Android/iOS,
configure the expo-font config plugin to embed the font at build time), and
update AppContainer to assume fonts are already available.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/AppContainer.tsx (1)

47-51: fontError is silently swallowed — consider logging it for diagnostics.

When fontError is non-null the app falls back to rendering without the custom font, which is the right behaviour, but nothing records that the failure happened. On the exact devices this PR targets (older Android), a future regression would be completely invisible.

🔍 Suggested observability improvement
 	const [loaded, fontError] = useFonts({
 		custom: require('./static/fonts/custom.ttf')
 	});
+
+	if (fontError) {
+		console.warn('[AppContainer] Custom font failed to load:', fontError);
+		// or log to your error-reporting service, e.g. logEvent(...)
+	}
 
 	if ((!loaded && !fontError) || !root) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/AppContainer.tsx` around lines 47 - 51, When useFonts returns a non-null
fontError in AppContainer.tsx, log the error for diagnostics without changing
the fallback behavior; add a single log (e.g., console.error or your app logger)
that runs when fontError is truthy (reference useFonts and the fontError
variable) and include a clear message like "Failed to load custom font" plus the
error object so older Android font failures are recorded. Place the log right
before the existing early-return/render fallback that checks "if ((!loaded &&
!fontError) || !root)" so behavior stays identical but the failure is
observable.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7861642 and bb93bbd.

📒 Files selected for processing (1)
  • app/AppContainer.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@app/AppContainer.tsx`:
- Around line 47-53: Previously the app could hang waiting for fonts because
fontError wasn't captured and the render guard was incorrect; ensure the
useFonts hook destructures the error (fontError) and that the render guard uses
"if ((!loaded && !fontError) || !root) return null;" so a font load failure
unblocks rendering while still waiting when fonts are loading and root is not
ready; verify these exact symbols (useFonts, fontError, loaded, root) are used
in AppContainer.tsx.

---

Nitpick comments:
In `@app/AppContainer.tsx`:
- Around line 47-51: When useFonts returns a non-null fontError in
AppContainer.tsx, log the error for diagnostics without changing the fallback
behavior; add a single log (e.g., console.error or your app logger) that runs
when fontError is truthy (reference useFonts and the fontError variable) and
include a clear message like "Failed to load custom font" plus the error object
so older Android font failures are recorded. Place the log right before the
existing early-return/render fallback that checks "if ((!loaded && !fontError)
|| !root)" so behavior stays identical but the failure is observable.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/AppContainer.tsx (1)

51-53: Move font error logging into a useEffect to avoid side effects during render.

log(fontError) runs on every re-render when the error is set (e.g., when root or isMasterDetail changes via Redux). Render should be pure — side effects belong in useEffect. This also prevents duplicate logs in React 19 Strict Mode's double-render.

♻️ Proposed fix
+	useEffect(() => {
+		if (fontError) {
+			log(fontError);
+		}
+	}, [fontError]);
+
-	if (fontError) {
-		log(fontError);
-	}
-
 	if ((!loaded && !fontError) || !root) {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/AppContainer.tsx` around lines 51 - 53, The font error logging is causing
a render-side effect — move the log(fontError) call out of the render body of
the AppContainer component into a useEffect that runs only when fontError
changes; add import { useEffect } from React if missing, create useEffect(() =>
{ if (fontError) log(fontError); }, [fontError]) so logging happens only once
per error and avoids duplicate logs in Strict Mode and other re-renders.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb93bbd and 4e36d8b.

📒 Files selected for processing (1)
  • app/AppContainer.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🔇 Additional comments (1)
app/AppContainer.tsx (1)

5-5: LGTM!

New imports are clean and both useFonts and log are used in the component body.

Also applies to: 20-20

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@app/AppContainer.tsx`:
- Around line 55-57: The existing guard in AppContainer—if ((!loaded &&
!fontError) || !root) return null;—correctly prevents render until fonts are
loaded (or errored) and root exists; leave this condition as-is in the
AppContainer component to preserve the original root invariant and the idiomatic
Expo useFonts behavior.

---

Nitpick comments:
In `@app/AppContainer.tsx`:
- Around line 51-53: The font error logging is causing a render-side effect —
move the log(fontError) call out of the render body of the AppContainer
component into a useEffect that runs only when fontError changes; add import {
useEffect } from React if missing, create useEffect(() => { if (fontError)
log(fontError); }, [fontError]) so logging happens only once per error and
avoids duplicate logs in Strict Mode and other re-renders.

@Rohit3523 Rohit3523 had a problem deploying to upload_experimental_android February 23, 2026 14:54 — with GitHub Actions Error
@github-actions
Copy link

Android Build Available

Rocket.Chat Experimental 4.70.0.108296

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNTMqDGL0GnKqGw-T_902u6jPnseCfI0l_IDq-pqmNPwnIA7LGrUQ15MCUvja8qFKqiiLwQAdt2Gbkyo3tRq

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses missing vector icons on older Android versions by ensuring the custom icon font is bundled and loaded before the app UI renders.

Changes:

  • Added the custom icon font file (custom.ttf) to the app’s static assets.
  • Preloads the custom font at app startup using expo-font’s useFonts, gating initial render until the font is ready (or a load error occurs).
  • Updated logging import to allow reporting font-load failures.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
app/static/fonts/custom.ttf Adds the bundled custom icon font used by the IcoMoon icon set.
app/AppContainer.tsx Preloads the custom font via useFonts and delays initial render until fonts are loaded.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build March 18, 2026 14:25 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build March 18, 2026 14:25 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build March 18, 2026 14:25 — with GitHub Actions Error
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/AppContainer.tsx (1)

51-55: Consider user-visible fallback when font loading fails.

When fontError is truthy, the app proceeds to render but the custom font won't be loaded, meaning icons will still be missing. The error is logged, but users on affected devices will see the broken icon state.

Consider whether to:

  1. Display a fallback UI or error message to users
  2. Retry font loading
  3. Accept this as acceptable degradation (log-only is sufficient)

If option 3 is intentional, this is fine as-is.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/AppContainer.tsx` around lines 51 - 55, The useEffect watching fontError
currently only calls log(fontError) and leaves users seeing broken icons; update
the handling for fontError (in the useEffect and related render logic in
AppContainer and any font-loading functions) to provide a user-visible fallback:
either set a new state like useFallbackIcons (toggled when fontError is truthy)
and render system-font/icon fallbacks or a small non-blocking banner/error
message, or implement a retry attempt (call your font load function with
exponential backoff from the useEffect) and fall back to system fonts if retries
fail; pick one approach, wire the state into the render path so icons/fonts
degrade gracefully instead of silently logging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/AppContainer.tsx`:
- Around line 51-55: The useEffect watching fontError currently only calls
log(fontError) and leaves users seeing broken icons; update the handling for
fontError (in the useEffect and related render logic in AppContainer and any
font-loading functions) to provide a user-visible fallback: either set a new
state like useFallbackIcons (toggled when fontError is truthy) and render
system-font/icon fallbacks or a small non-blocking banner/error message, or
implement a retry attempt (call your font load function with exponential backoff
from the useEffect) and fall back to system fonts if retries fail; pick one
approach, wire the state into the render path so icons/fonts degrade gracefully
instead of silently logging.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 523c4257-c54d-4039-99a7-d3e5cbf6d49c

📥 Commits

Reviewing files that changed from the base of the PR and between 4e36d8b and e9fa212.

⛔ Files ignored due to path filters (2)
  • ios/Podfile.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • app.json
  • app/AppContainer.tsx
  • package.json
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2026-02-05T13:55:00.974Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:00.974Z
Learning: In this repository, the dependency on react-native-image-crop-picker should reference the RocketChat fork (RocketChat/react-native-image-crop-picker) with explicit commit pins, not the upstream ivpusic/react-native-image-crop-picker. Update package.json dependencies (and any lockfile) to point to the fork URL and a specific commit, ensuring edge-to-edge Android fixes are included. This pattern should apply to all package.json files in the repo that declare this dependency.

Applied to files:

  • package.json
📚 Learning: 2026-02-05T13:55:06.688Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:06.688Z
Learning: The RocketChat/Rocket.Chat.ReactNative repository uses a fork of react-native-image-crop-picker (RocketChat/react-native-image-crop-picker) with custom Android edge-to-edge fixes, not the upstream ivpusic/react-native-image-crop-picker package. Dependencies should reference commit pins from the RocketChat fork.

Applied to files:

  • app.json
📚 Learning: 2026-03-10T15:21:45.098Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.

Applied to files:

  • app/AppContainer.tsx
🔇 Additional comments (5)
app.json (1)

2-5: LGTM!

The expo-font plugin is correctly added to enable native font loading support, which is required for the useFonts hook in AppContainer.tsx.

app/AppContainer.tsx (3)

47-59: LGTM! The font loading guard logic is correct.

The implementation properly follows the idiomatic Expo pattern:

  • Waits for fonts to load OR error before proceeding
  • Maintains the root invariant to prevent rendering with empty navigation state
  • Logs font errors without blocking the app indefinitely

5-5: LGTM!

The imports are correctly updated to support the new font loading functionality.

Also applies to: 20-20


47-49: The custom font file is already present at the specified path.

The file app/static/fonts/custom.ttf exists in the repository, so the font loading will proceed without errors. No action needed.

package.json (1)

68-68: No compatibility issue. The version expo-font@~13.3.2 is the expected version for Expo SDK 53 and is fully compatible.

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing March 18, 2026 14:27 — with GitHub Actions Waiting
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app.json`:
- Around line 2-3: The app.json currently lists "expo-font" in the "plugins"
array but that declaration is ineffective because this repo uses the bare React
Native build workflow invoked via npx react-native run-ios / npx react-native
run-android (which bypasses expo prebuild); either remove the unused "expo-font"
entry from the "plugins" array in app.json, or migrate the build workflow to use
expo prebuild / EAS Build so the "expo-font" plugin is applied during native
generation and font preloading works as expected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 37c950fa-9d03-4296-a10a-292d7ab03c5a

📥 Commits

Reviewing files that changed from the base of the PR and between e9fa212 and c36c4f2.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • app.json
  • package.json
  • tsconfig.json
✅ Files skipped from review due to trivial changes (1)
  • tsconfig.json
📜 Review details
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-02-05T13:55:00.974Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:00.974Z
Learning: In this repository, the dependency on react-native-image-crop-picker should reference the RocketChat fork (RocketChat/react-native-image-crop-picker) with explicit commit pins, not the upstream ivpusic/react-native-image-crop-picker. Update package.json dependencies (and any lockfile) to point to the fork URL and a specific commit, ensuring edge-to-edge Android fixes are included. This pattern should apply to all package.json files in the repo that declare this dependency.

Applied to files:

  • package.json
📚 Learning: 2026-02-05T13:55:06.688Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:06.688Z
Learning: The RocketChat/Rocket.Chat.ReactNative repository uses a fork of react-native-image-crop-picker (RocketChat/react-native-image-crop-picker) with custom Android edge-to-edge fixes, not the upstream ivpusic/react-native-image-crop-picker package. Dependencies should reference commit pins from the RocketChat fork.

Applied to files:

  • app.json
🔇 Additional comments (1)
package.json (1)

67-67: Lockfile properly captures the new expo-font dependency with exact resolution.

The dependency is correctly recorded in yarn.lock at version 13.3.2 with its integrity hash, ensuring deterministic installs across CI and local environments.

Comment on lines +2 to +3
"name": "RocketChatRN",
"plugins": ["expo-font"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Expect: plugin is declared in app config.
rg -n '"plugins"\s*:\s*\[.*"expo-font".*\]' app.json -C2
fd -HI 'app.json|app.config.js|app.config.ts|app.config.mjs|app.config.cjs'

# Expect: some workflow reference to Expo config/prebuild if plugin effects are required at build-time.
rg -n 'expo prebuild|expo config|eas build|expo run:android|expo run:ios' package.json -C2

Repository: RocketChat/Rocket.Chat.ReactNative

Length of output: 149


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check package.json for build scripts and Expo/EAS references
echo "=== package.json content ==="
cat package.json | head -100

# Check for EAS build configuration
echo -e "\n=== Checking for eas.json ==="
find . -name "eas.json" -type f 2>/dev/null || echo "No eas.json found"

# Check for native directories
echo -e "\n=== Checking for native directories ==="
ls -la | grep -E '^d.*\s(ios|android)$' || echo "No ios/android directories"

# Check app.json more thoroughly
echo -e "\n=== Full app.json content ==="
cat app.json

Repository: RocketChat/Rocket.Chat.ReactNative

Length of output: 4406


The expo-font plugin declaration in app.json has no effect with the current build workflow.

The project uses npx react-native run-ios and npx react-native run-android commands to build (bare React Native workflow with native directories). Expo plugins only apply when using expo prebuild or eas build. Since the native build path bypasses the Expo prebuild system entirely, the plugin configuration in app.json is never executed. Either remove the unused plugin declaration from app.json, or switch the build workflow to use Expo prebuild/EAS Build if font preloading is needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app.json` around lines 2 - 3, The app.json currently lists "expo-font" in the
"plugins" array but that declaration is ineffective because this repo uses the
bare React Native build workflow invoked via npx react-native run-ios / npx
react-native run-android (which bypasses expo prebuild); either remove the
unused "expo-font" entry from the "plugins" array in app.json, or migrate the
build workflow to use expo prebuild / EAS Build so the "expo-font" plugin is
applied during native generation and font preloading works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants